﻿<UserControl x:Class="Teudu.InfoDisplay.EventSashControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Width="150" Height="150" HorizontalAlignment="Left" VerticalAlignment="Top">
        <Polygon
            Points="0,0 150,0 0,150 "
            Stroke="{Binding TriangleFill,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
            StrokeThickness="2" >
            <Polygon.Fill>
                <SolidColorBrush Color="{Binding TriangleFill,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"/>
            </Polygon.Fill>
        </Polygon>
        <TextBlock TextAlignment="Center" Text="{Binding Text,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}" Foreground="{Binding TextColor,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}" FontSize="{Binding FontSize, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl} }}" Height="40" Width="150">
            <TextBlock.RenderTransform>
                <TransformGroup>
                    <TranslateTransform Y="-30"/>
                    <RotateTransform Angle="-45" CenterX="75" CenterY="20"/>
                </TransformGroup>
            </TextBlock.RenderTransform>
        </TextBlock>
    </Grid>
</UserControl>
